#ifndef TILEMAPADAPTER_H
#define TILEMAPADAPTER_H

#include "mapadapter.h"

class TileMapAdapter : public MapAdapter
{
    Q_OBJECT
public:

    TileMapAdapter(const QString& host, const QString& serverPath, int tilesize, int minZoom = 0, int maxZoom = 17);

    virtual ~TileMapAdapter();

    virtual QPoint coordinateToDisplay(const QPointF&) const;
    virtual QPointF displayToCoordinate(const QPoint&) const;

    qreal PI;

protected:
    qreal rad_deg(qreal) const;
    qreal deg_rad(qreal) const;

    virtual bool isValid(int x, int y, int z) const;
    virtual void zoom_in();
    virtual void zoom_out();
    virtual QString query(int x, int y, int z) const;
    virtual int tilesonzoomlevel(int zoomlevel) const;
    virtual int xoffset(int x) const;
    virtual int yoffset(int y) const;
};

#endif
